# Makefile for CS 360 example code

CXX=	g++ -g
OBJS=	test.o

LIBS=	-pthread

CCFLAGS= -g

all:		test

test:		$(OBJS)
		$(CXX) -o test $(OBJS) $(LIBS)

clean:
		rm -f $(OBJS) $(OBJS:.o=.d)

realclean:
		rm -f $(OBJS) $(OBJS:.o=.d) test


# These lines ensure that dependencies are handled automatically.
%.d:	%.cc
	$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \
		| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
		[ -s $@ ] || rm -f $@'

include	$(OBJS:.o=.d)
